@import '~@styles/common.less';

.removeCommentConfirm {
  .antdConform();
}

.darkRemoveCommentConfirm {
  .darkAntdConform();
}

.Comments {
  background-color: @fff;
  padding: 0 20px 20px 20px;
  border-radius: 5px;

  .draftInputWrap {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    background-color: @fff;
  }

  .title {
    font-size: 18px;
    font-weight: 600;
    padding: 40px 20px 0 0;
    background-color: @fff;
  }

  .replyCount {
    margin-left: 5px;
  }

  .commentWrap {
    display: flex;
    justify-content: space-between;
    padding-top: 30px;

    .avatar {
      margin-right: 20px;

      .image {
        width: 50px;
        height: 50px;
        border-radius: 50px;
      }
    }

    .iconWrap {
      margin-right: 20px;
      &:hover {
        color: @menu-active;
      }
      cursor: pointer;
      .clickNoSelectText();
    }

    .isLike {
      color: @menu-active;
    }

    .commentContent {
      flex: 1;

      .commentMain {
        &:hover {
          .deleteComment {
            display: block;
          }
        }
      }

      .userInfo {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;

        .name {
          font-size: 16px;
          font-weight: 600;

          .isAuthor {
            margin-left: 10px;
            font-weight: 400;
            font-size: 14px;
          }

          .replyInfo {
            font-weight: 400;
            font-size: 14px;
            margin-left: 10px;

            .fromUsername {
              font-size: 16px;
              margin-left: 10px;
              font-weight: 600;
            }
          }
        }

        .date {
          color: @font-4;
        }
      }

      .formContent {
        margin-top: 10px;
        border: 1px solid @layer-3-border;
        padding: 5px 20px 6px 20px;
        background-color: @background;
        border-radius: 5px;
        word-break: break-all;
      }

      .deleteComment {
        display: none;
        padding: 0;
      }

      .action {
        margin-top: 10px;

        .actionContent {
          display: flex;
          justify-content: space-between;
          align-items: center;

          .likeAndReplay {
            display: flex;
            align-items: center;
            height: 32px;
            line-height: 32px;
          }
        }

        .draftContent {
          padding-left: 0;
        }

        .cancelReplay {
          color: @menu-active;
        }
      }

      .commentChild {
        background-color: @layer-2-2;
        margin-top: 15px;
        padding: 15px;
        border-radius: 5px;

        .commentChildItem {
          display: flex;
          margin-bottom: 20px;

          .commentChildItemContent {
            width: 625px;

            &:hover {
              .deleteComment {
                display: block;
              }
            }
          }

          .avatar {
            width: 35px;
            height: 35px;

            .image {
              width: 35px;
              height: 35px;
            }
          }

          &:last-child {
            margin-bottom: 0;
          }
        }

        .viewMore {
          display: flex;
          justify-content: flex-start;
          align-items: center;
          cursor: pointer;
          .clickNoSelectText();

          .viewText {
            margin-right: 5px;
            padding-left: 55px;
          }
        }
      }
    }
  }
}

.dark {
  background-color: @dark-bgc-deep;
  color: @dark-fc;

  .draftInputWrap,
  .title {
    background-color: @dark-bgc-deep;
    color: @dark-fc;
  }

  .commentWrap {
    .commentContent {
      .commentChild {
        background-color: @dark-bgc-deep;
        color: @dark-fc;
      }

      .formContent {
        background-color: @dark-bgc;
        color: @dark-fc;
        border: @dark-gray;
        word-break: break-all;
      }
    }

    .iconWrap {
      color: @dark-fc-gray;
    }
  }
}

@media screen and (max-width: 960px) {
  .Comments {
    padding: 0 10px 20px 10px;

    .commentWrap {
      .avatar {
        margin-right: 10px;

        .image {
          width: 35px;
          height: 35px;
        }
      }

      .commentContent {
        .userInfo {
          .name {
            font-size: 14px;
          }
          .date {
            font-size: 12px;
          }
        }

        .commentChild {
          padding: 5px;

          .viewMore {
            .viewText {
              padding-left: 45px;
            }
          }

          .commentChildItem {
            position: relative;

            .avatar {
              position: absolute;
            }

            .commentChildItemContent {
              .userInfo {
                padding-left: 45px;

                .name {
                  flex: 1;
                  font-size: 14px;
                  .ellipsis();
                }

                .fromUsername {
                  font-size: 14px;
                }

                .date {
                  flex: 0.38;
                  font-size: 12px;
                  text-align: right;
                }
              }

              .desc {
                padding-left: 45px;
              }

              .formContent {
                margin-left: 45px;
              }

              .action {
                .actionContent {
                  margin-left: 45px;
                }

                .textAreaWrapH5,
                .emojiWrapH5 {
                  padding-left: 45px;
                }
              }
            }
          }
        }
      }
    }
  }
}
